package com.demo.customer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.demo.common.domin.User;
import com.demo.common.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName: UserController
 * @Package: com.demo.customer.controller
 * @Description:
 * @Datetime: 2020/7/10   17:15
 * @author: kaishun.zhou
 */
@RestController
public class UserController {

    @Resource
    @Reference(version = "1.0.0")
    private UserService userService;

    @GetMapping("getUser")
    public List<User> user(){
        System.out.println("进入消费者方法");
        return userService.findAll();
    }

}
